<template>
  <div>
    <topHead  :personIfno="personInfo"/>
    <sideBar/>
    <div class='all'>
      <router-view></router-view>
    </div>
    <setTime/>
  </div>
</template>

<script>
  export default {
    name:'homePage',
    mounted(){
      this.getPersonInfo()
    },
    data () {
        return {
            personInfo:{}
        }
    },
    methods:{
      async getPersonInfo(){
        await this.$API.call('/home','get')
        .then(res=>this.personInfo = res.data)
        .catch(()=>console.log(new Error('failed')))
      }
    }
  }
</script>

<style lang='less' scoped>
.all{
  margin: 20px 3% 0 17%;
  border: 2px solid black;
  height: 820px;
  overflow-y: auto;
  max-height:820px;
}
</style>